import {baseUrl} from "@/config/env";

export default () => {
    return {
        index: true,
        indexWidth: 60,
        selection: true,
        size: 'default',
        labelWidth: 100,
        indexLabel: '序号',
        dialogType: 'drawer',
        menuAlign: 'center',
        menuType: "menu",
        align: 'center',
        dialogClickModal: false,
        addBtn: false,
        editBtn: false,
        menu: false,
        searchIndex: 2,
        searchMenuSpan: 6,
        searchIcon: true,


        column: [
            {
                label: '数据表名',
                span: 24,
                prop: 'tableName',
                search: true,
                searchSpan: 6,
                editDetail: true,
                viewDetail: true,
                rules: [{
                    required: true,
                    trigger: "blur"
                }]
            },
            {
                label: '表备注',
                span: 24,
                prop: 'tableComment',
                search: true,
                searchSpan: 6,
                searchLabelWidth: 120,
            },

            {
                label: '数据源',
                span: 24,
                prop: 'dataSourceKeyFlag',
                type: 'select',
                search: true,
                addDisplay: true,
                editDetail: true,
                viewDetail: true,
                hide: true,
                showColumn: false,
                searchSpan: 6,
                searchOrder: 1,
                searchValue: 'master',
                dicUrl: baseUrl + "/start/dataSource/list",
                dicMethod: "get",
                props: {
                    label: 'name',
                    value: 'keyFlag',
                },
            },
            {
                label: '创建时间',
                prop: 'createTime',
                type: 'datetime',
                format: "YYYY-MM-DD HH:mm:ss",
                span: 24,
                addDisplay: false,
                editDetail: true,
                viewDetail: true,
            },
        ]
    }
}
